﻿using OnlineLearningSystem.Model;
using System;
using System.Collections.Generic;
using System.Text;

namespace OnlineLearningSystem.IRepository
{
    public interface ITopicRepository
    {
        /// <summary>
        /// 创建实体
        /// </summary>
        /// <param name="entity"></param>
        void Create(Topic entity);

        /// <summary>
        /// 条件查询单个实体
        /// </summary>
        /// <param name="wherelambda"></param>
        /// <returns></returns>

        Topic Get(Func<Topic, bool> wherelambda);

        /// <summary>
        /// 查询所有实体
        /// </summary>
        /// <returns></returns>
        List<Topic> GetAll();

        //List<Topic> GetAll(Func<Topic, bool> wherelambda);

        //List<Topic> GetAll(dynamic topic);

        /// <summary>
        /// 更新实体
        /// </summary>
        /// <param name="user"></param>
        void Update(Topic user);

        /// <summary>
        /// 删除实体
        /// </summary>
        /// <param name="topic"></param>
        void Delete(Topic topic);
    }
}
